package com.lineage.data.item_etcitem.quest;

import com.lineage.data.executor.ItemExecutor;
import com.lineage.server.model.Instance.L1ItemInstance;
import com.lineage.server.model.Instance.L1PcInstance;
import com.lineage.server.serverpackets.S_ServerMessage;
import com.lineage.server.serverpackets.S_SkillSound;
import com.lineage.server.serverpackets.ServerBasePacket;

public class Holy_Water extends ItemExecutor {
  public static ItemExecutor get() {
    return new Holy_Water();
  }
  
  public void execute(int[] data, L1PcInstance pc, L1ItemInstance item) {
    if (pc.hasSkillEffect(1015)) {
      pc.sendPackets((ServerBasePacket)new S_ServerMessage(79));
      return;
    } 
    if (pc.hasSkillEffect(1014))
      pc.removeSkillEffect(1014); 
    pc.setSkillEffect(1013, 900000);
    pc.sendPacketsX8((ServerBasePacket)new S_SkillSound(pc.getId(), 190));
    pc.sendPackets((ServerBasePacket)new S_ServerMessage(1141));
    pc.getInventory().removeItem(item, 1L);
  }
}
